import 'dart:async';
import 'package:flutter/material.dart';

class CusFlex extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        BlueBox(),
        // flexible组件包裹的widget可以调整大小 -> 变成可flexible的（通过flex/fit属性调整大小）
        Flexible(
          fit: FlexFit.tight,
          flex: 3,
          child: BlueBox(),
        ),
        Flexible(
          fit: FlexFit.tight,
          flex: 1,
          child: BlueBox()
        )
      ],
    );
  }
}

class BlueBox extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 50,
      height: 50,
      decoration: BoxDecoration(
        color: Colors.blue,
        border: Border.all()
      ),
    );
  }
}